<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;
use App\Middleware\Auth\LoginMiddleware;

Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\IndexController@index');


Router::addGroup('/user',function (){
    Router::get('/getInfo', [\App\Controller\UserController::class, 'getUserInfo']);
    Router::get('/getList', [\App\Controller\UserController::class, 'getUserList']);
    Router::get('/add', [\App\Controller\UserController::class, 'addUser']);
    Router::get('/update', [\App\Controller\UserController::class, 'updateUser']);
    },
    ['middleware' => [LoginMiddleware::class]]
);
